﻿@using Bids.Service;
@using Autofac;
@using Autofac.Integration.Mvc;
@using Bids.Core;
@{
    ViewBag.Title = "更改密码";
    Layout = "~/Views/Designer/_Layout.cshtml";
    IUserContext userContext = AutofacDependencyResolver.Current.RequestLifetimeScope.Resolve<IUserContext>();
}
@section head
{
    <script src="/js/jquery.validate.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {
            $("form").validate({
                event: "blur",
                errorElement: "span",
                errorPlacement: function (error, element) {
                    error.appendTo(element.parent("div"));
                    error.appendTo(element.parent("td"));
                },
                success: function (label) {
                    label.addClass("success");
                }
            });
        });
    </script>
}
<div class="content">
    <div style="margin-top: 4em;" class="post">
        <div class="form-horizontal">
            <form method="post" action="@Url.Action("Changepwd","Designer")">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label" for="input01">旧密码</label>
                        <div class="controls">
                            <input type="password" name="oldPassword" class="input-xlarge required" remote="checkpwd">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="input01">新密码</label>
                        <div class="controls">
                            <input type="password" name="password" class="input-xlarge required">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="input01">确认密码</label>
                        <div class="controls">
                            <input type="password" name="password1" class="input-xlarge required">
                        </div>
                    </div>
                    <div class="form-actions">
                        <input id="password_btn" type="submit" value="更新" class="btn btn-primary btn-large pull-left" />
                        <div class="submit-status">
                            <div id="password_msg" class="msg"></div>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>

    </div>
</div>
<script type="text/javascript" language="javascript">

    var massage = "@TempData["Message"]";  
        if (massage != null && massage != "") {
            var da = art.dialog({
                lock: true,
                time: 3,
                content: massage,
                icon: 'face-smile',
                ok: function () {
                    da.close();
                }
            });
        }
</script>
